/**
 * 北京中流科技有限公司 版权所有
 * http://www.chinasoa.com.cn
 */
package cn.com.chinasoa.course.subscribe.test;

import javax.persistence.EntityManager;

import cn.com.chinasoa.course.subscribe.model.TrainingAddress;
import cn.com.chinasoa.course.subscribe.util.EntityManagerHelper;

/**
 * @author 刘洋(liuyang@chinasoa.com.cn)
 * 2007-10-31上午02:07:05
 */
public class TrainingAddressCreate {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		EntityManager em = EntityManagerHelper.getEntityManager();
		em.getTransaction().begin();
		TrainingAddress trainingAddress = new TrainingAddress();
		trainingAddress.setAddress("北京宣武区菜市口大街亚泰中心A1011");
		trainingAddress.setCapacity(8);
		trainingAddress.setCity("北京");
		trainingAddress.setTrafficInfo("坐地铁至宣武门站，然后转乘54、604、646至自新路口站下车");
		em.persist(trainingAddress);
		em.getTransaction().commit();
		EntityManagerHelper.closeEntityManager();
	}

}
